package com.itheima.d7_commons_io;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;

public class CommonsIOTest1 {
    public static void main(String[] args) throws Exception {
        //io框架
        FileUtils.copyFile(new File("Day18-io-app\\src\\itheimaOut06.txt"),new File("Day18-io-app\\src\\itheimaOut10.txt"));
        FileUtils.copyDirectory(new File("原路径"),new File("新路径"));
        FileUtils.deleteDirectory(new File("原路径","新路径"));

        //java提供的一行原生代码
        Files.copy(Path.of("213"),Path.of("3230"));
        System.out.println(Files.readString(Path.of("32121")));
    }
}
